﻿using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Postnuclear.Collections;
using Postnuclear.Test.Helpers;

namespace Postnuclear.Test.Collections
  {
  /// <summary>
  /// Represents a test class for the <see cref="ObservableCollection{T}"/> class.
  /// </summary>
  [TestClass]
  public sealed class ObservableCollectionTest
    : TestClassBase
    {
    #region Public

    // Methods

    /// <summary>
    /// Tests <see cref="ICollection{T}"/> implementation.
    /// </summary>
    [TestMethod]
    public void CollectionTest()
      {
      CollectionValidator.Validate(
        () => new ObservableCollection<object>(),
        () => new object());
      }

    /// <summary>
    /// Tests <see cref="INotifyCollectionChanged{T}"/> implementation.
    /// </summary>
    [TestMethod]
    public void NotifyCollectionChangedTest()
      {
      NotifyCollectionChangedValidator.Validate(
        () => new ObservableCollection<object>(),
        () => new object());
      }

    #endregion
    }
  }
